(function () {
		function $(id){ return document.getElementById(id)}
		function AlertMsg(title,content){
			var leftHalf = 784;
			var topHalf = 279
			//遮罩背景设置
			var sWidth,sHeight;
			sWidth = screen.availWidth;
			sHeight = document.body.scrollHeight;
			//创建遮罩背景
			var maskObj = document.createElement("div");
			maskObj.setAttribute('id','maskdiv');
			maskObj.style.position = "absolute";
			maskObj.style.top = "0";
			maskObj.style.left = "0";
			maskObj.style.background = "#555";
			maskObj.style.filter = "Alpha(opacity=50);";
			maskObj.style.opacity = "0.5";
			maskObj.style.width = sWidth + "px";
			maskObj.style.height = sHeight + "px";
			maskObj.style.zIndex = "10000";
			document.body.appendChild(maskObj);

			//创建弹出窗口
			var msgObj = document.createElement("div")
			msgObj.setAttribute("id","msgdiv");
			msgObj.style.position ="absolute";
			msgObj.style.top = (window.innerHeight-topHalf) / 4 + "px";
			msgObj.style.left = (window.innerWidth-leftHalf) / 2 + "px";
			msgObj.style.zIndex = "10001";

			//创建内容
			var bodyObj = document.createElement("div");
			bodyObj.setAttribute("id","msgbody");
			bodyObj.style.padding = "10px";
			bodyObj.style.lineHeight = "1.5em";

			//生成窗口
			document.body.appendChild(msgObj);
			$("msgdiv").appendChild(bodyObj);
			$("msgbody").innerHTML = content;
		}
			function CloseMsg(){
				//移除对象
				document.body.removeChild($("maskdiv"));
				document.body.removeChild($("msgdiv"));
			}
			//拖动窗口
	/*var ie = document.all;
			var nn6 = document.getElementById&&!document.all;
			var isdrag = false;
			var y,x;
			var oDragObj;
			function moveMouse(e) {
			if (isdrag) {
			oDragObj.style.top = (nn6 ? nTY + e.clientY - y : nTY + event.clientY - y)+"px";
			oDragObj.style.left = (nn6 ? nTX + e.clientX - x : nTX + event.clientX - x)+"px";
			return false;
			}
			}*/
			/*function initDrag(e) {
			var oDragHandle = nn6 ? e.target : event.srcElement;
			var topElement = "HTML";
			while (oDragHandle.tagName != topElement && oDragHandle.className != "DragAble") {
			oDragHandle = nn6 ? oDragHandle.parentNode : oDragHandle.parentElement;
			}
			if (oDragHandle.className=="DragAble") {
			isdrag = true;
			oDragObj = oDragHandle.parentNode;
			nTY = parseInt(oDragObj.style.top);
			y = nn6 ? e.clientY : event.clientY;
			nTX = parseInt(oDragObj.style.left);
			x = nn6 ? e.clientX : event.clientX;
			document.onmousemove = moveMouse;
			return false;
			}
			}
			document.onmousedown = initDrag;
			document.onmouseup = new Function("isdrag=false");*/
	window["AlertMsg"] = AlertMsg;
	window["CloseMsg"] = CloseMsg;
})()